package com.news.model.bean;

import android.os.Parcel;

/**
 * Created with Android Studio
 * User: ShiLiang
 * Date: 2017/3/2/0002
 * Project: TodayNews
 */

public class Joke extends BaseBean {

    /**
     * content : 一天，一个朋友来找老霍说：“老霍，我想借你的驴。”　　老霍说：“已经借给别人了。”　　他刚说完，驴就叫起来了。　　“老霍，我听见驴叫了。”　　老霍冲着他的朋友说：“你是相信我的话呢，还是相信驴的话啊。”
     * hashId : 822bf3e21330762ad9f60b36457dbc34
     * unixtime : 1488432230
     * updatetime : 2017-03-02 13:23:50
     */

    private String content;
    private String hashId;
    private int unixtime;
    private String updatetime;
    private String url;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getHashId() {
        return hashId;
    }

    public void setHashId(String hashId) {
        this.hashId = hashId;
    }

    public int getUnixtime() {
        return unixtime;
    }

    public void setUnixtime(int unixtime) {
        this.unixtime = unixtime;
    }

    public String getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(String updatetime) {
        this.updatetime = updatetime;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public String getTime(){
        return String.valueOf(unixtime);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.content);
        dest.writeString(this.hashId);
        dest.writeInt(this.unixtime);
        dest.writeString(this.updatetime);
        dest.writeString(this.url);
    }

    public Joke() {
    }

    protected Joke(Parcel in) {
        super(in);
        this.content = in.readString();
        this.hashId = in.readString();
        this.unixtime = in.readInt();
        this.updatetime = in.readString();
        this.url = in.readString();
    }

    public static final Creator<Joke> CREATOR = new Creator<Joke>() {
        @Override
        public Joke createFromParcel(Parcel source) {
            return new Joke(source);
        }

        @Override
        public Joke[] newArray(int size) {
            return new Joke[size];
        }
    };

    @Override
    public String toString() {
        return "Joke{" +
                "content='" + content + '\'' +
                ", hashId='" + hashId + '\'' +
                ", unixtime=" + unixtime +
                ", updatetime='" + updatetime + '\'' +
                ", url='" + url + '\'' +
                '}';
    }
}
